package com.gqj.meter.service.impl;

import com.gqj.meter.domain.SysUpgradeRecord;
import com.gqj.meter.mapper.SysUpgradeRecordMapper;
import com.gqj.meter.service.ISysUpgradeRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 升级记录Service业务层处理
 *
 * @author lxq
 * @date lxq-01-09
 */
@Service
public class SysUpgradeRecordServiceImpl implements ISysUpgradeRecordService
{
    @Autowired
    private SysUpgradeRecordMapper sysUpgradeRecordMapper;

    /**
     * 查询升级记录
     *
     * @param upgradeId 升级记录主键
     * @return 升级记录
     */
    @Override
    public SysUpgradeRecord selectSysUpgradeRecordByUpgradeId(Integer upgradeId)
    {
        return sysUpgradeRecordMapper.selectSysUpgradeRecordByUpgradeId(upgradeId);
    }

    /**
     * 查询升级记录列表
     *
     * @param sysUpgradeRecord 升级记录
     * @return 升级记录
     */
    @Override
    public List<SysUpgradeRecord> selectSysUpgradeRecordList(SysUpgradeRecord sysUpgradeRecord)
    {
        return sysUpgradeRecordMapper.selectSysUpgradeRecordList(sysUpgradeRecord);
    }

    /**
     * 新增升级记录
     *
     * @param sysUpgradeRecord 升级记录
     * @return 结果
     */
    @Override
    public int insertSysUpgradeRecord(SysUpgradeRecord sysUpgradeRecord)
    {
        return sysUpgradeRecordMapper.insertSysUpgradeRecord(sysUpgradeRecord);
    }

    /**
     * 修改升级记录
     *
     * @param sysUpgradeRecord 升级记录
     * @return 结果
     */
    @Override
    public int updateSysUpgradeRecord(SysUpgradeRecord sysUpgradeRecord)
    {
        return sysUpgradeRecordMapper.updateSysUpgradeRecord(sysUpgradeRecord);
    }

    /**
     * 批量删除升级记录
     *
     * @param upgradeIds 需要删除的升级记录主键
     * @return 结果
     */
    @Override
    public int deleteSysUpgradeRecordByUpgradeIds(Integer[] upgradeIds)
    {
        return sysUpgradeRecordMapper.deleteSysUpgradeRecordByUpgradeIds(upgradeIds);
    }

    /**
     * 删除升级记录信息
     *
     * @param upgradeId 升级记录主键
     * @return 结果
     */
    @Override
    public int deleteSysUpgradeRecordByUpgradeId(Integer upgradeId)
    {
        return sysUpgradeRecordMapper.deleteSysUpgradeRecordByUpgradeId(upgradeId);
    }
}
